package com.app.newiptv.gen;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.app.newiptv.bean.greendao.ProgramDB;
import com.app.newiptv.bean.greendao.SitcomListGen;

import com.app.newiptv.gen.ProgramDBDao;
import com.app.newiptv.gen.SitcomListGenDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig programDBDaoConfig;
    private final DaoConfig sitcomListGenDaoConfig;

    private final ProgramDBDao programDBDao;
    private final SitcomListGenDao sitcomListGenDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        programDBDaoConfig = daoConfigMap.get(ProgramDBDao.class).clone();
        programDBDaoConfig.initIdentityScope(type);

        sitcomListGenDaoConfig = daoConfigMap.get(SitcomListGenDao.class).clone();
        sitcomListGenDaoConfig.initIdentityScope(type);

        programDBDao = new ProgramDBDao(programDBDaoConfig, this);
        sitcomListGenDao = new SitcomListGenDao(sitcomListGenDaoConfig, this);

        registerDao(ProgramDB.class, programDBDao);
        registerDao(SitcomListGen.class, sitcomListGenDao);
    }
    
    public void clear() {
        programDBDaoConfig.clearIdentityScope();
        sitcomListGenDaoConfig.clearIdentityScope();
    }

    public ProgramDBDao getProgramDBDao() {
        return programDBDao;
    }

    public SitcomListGenDao getSitcomListGenDao() {
        return sitcomListGenDao;
    }

}
